﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CardCenter/card.master" AutoEventWireup="true" CodeFile="OnlinePurchaseCardStep2.aspx.cs" Inherits="CardCenter_OnlinePurchaseCardStep2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head1" Runat="Server">
<script type="text/javascript" src="../Scripts/jquery-min-lastest.js"></script>
<script src="../Scripts/jquery-ui-all-min-lastest.js" type="text/javascript"></script>    
<script type="text/javascript" src="../Scripts/aboutverifycode.js"></script>
<script type="text/javascript" src="../Scripts/My97DatePicker/WdatePicker.js"></script>
 <script type="text/javascript">
         $(function(){
             var regNumber = /^[1-9]+[0-9]*]*$/  
             var errorCount = 0;
             var carNumArr = null;
             $("input[id*=ImageBrnUpdate]").bind("click",function(){
                //依次验证表格中数据
                $(".NumberValidate").each(function(){
                    errorCount = 0;
                    var $cardNum = $(this).val();
                    if (!regNumber.test($cardNum) || $cardNum == ""){
                        $(this).val(1)
                        errorCount++;
                    }
                });
                if(errorCount > 0){
                    errorCount = 0;
                    alert("购卡张数不能为空且必须大于0！");
                }
             });
         
         });
     </script>


    <style type="text/css">
        .style1
        {
            width: 100%;
            height: 37px;
        }
        .style2
        {
            height: 54px;
        }
        .style3
        {
            height: 54px;
            width: 243px;
        }
        #txtCardNums
        {
        	text-align:center;
        }
		#m3{  height: 54px; 
      text-align:-moz-center;
      *text-align:center;}
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="r" Runat="Server">
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManagerPurchaseStep2" runat="server">
</asp:ScriptManager>
<div id="r1"><div id="r11"><a href="OnlinePurchaseCardStep1.aspx">&nbsp;&nbsp;卡务中心</a><a href="OnlinePurchaseCardStep1.aspx">&nbsp;&nbsp;>>在线购卡</a></div></div>
    <div style="width:729px; height:41px;">
    <div style="width:20px; height:41px; float:left;"></div>
    <div style="width:24px; height:31px; float:left; background-image:url(../Images/CardCenterImg/hui1.jpg);"></div>
     <div style="width:70px; height:41px; float:left;text-align:center; font-size:12px; font-weight:bold; line-height:31px; color:Gray;">购卡协议</div>
     <div style="width:24px; height:31px; float:left; background-image:url(../Images/CardCenterImg/hui2.jpg);"></div>
     <div style="width:70px; height:41px; float:left;text-align:center; font-size:12px; font-weight:bold; line-height:31px; color:Gray;">购卡选项</div>
    <div style="width:24px; height:31px; float:left; background-image:url(../Images/CardCenterImg/hui3.jpg);"></div>
    <div style="width:100px; height:41px; float:left;text-align:center; font-size:12px; font-weight:bold; line-height:31px;color:Gray;">填写购卡信息</div>
    <div style="width:32px; height:41px; float:left; background-image:url(../Images/CardCenterImg/cai4.jpg);"></div>
    <div style="width:130px; height:41px; float:left;text-align:center; font-size:12px; font-weight:bold; line-height:41px; ">确认购物清单和金额</div>
    <div style="width:24px; height:31px; float:left; background-image:url(../Images/CardCenterImg/hui5.jpg);"></div>
    <div style="width:70px; height:41px; float:left;text-align:center; font-size:12px; font-weight:bold; line-height:31px; color:Gray;">在线支付</div>
    <div style="width:24px; height:31px; float:left; background-image:url(../Images/CardCenterImg/hui6.jpg);"></div>
    <div style="width:70px; height:41px; float:left;text-align:center; font-size:12px; font-weight:bold; line-height:31px; color:Gray;">支付确认</div>
    </div>
    <div style="border-top:16px #fff solid; line-height:16px;"></div>
    <div style="border-bottom:8px #fff solid; border-top:dotted thin #ccc; line-height:8px; width:729px;"></div>
    
    <div style="width:729px; height:175px;">
        <asp:UpdatePanel ID="UpdatePanelPurchaseOnlineStep2" runat="server" EnableViewState="false">
             <ContentTemplate>
                 <asp:DataGrid ID="DgCat" runat="server" AllowSorting="True" CellPadding="3" 
                    GridLines="Horizontal" AutoGenerateColumns="False" BackColor="White" 
                    BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" >
                    <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                    <SelectedItemStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                    <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" 
                        Mode="NumericPages" />
                    <AlternatingItemStyle BackColor="#F7F7F7" />
                    <ItemStyle BackColor="#E7E7FF"  Width="100%" HorizontalAlign="Center" 
                        BorderWidth="1" ForeColor="#121D27" Font-Size="12px" Height="30px" 
                         Font-Bold="False" Font-Italic="False" Font-Overline="False" 
                         Font-Strikeout="False" Font-Underline="False" VerticalAlign="Middle"/>
                    
                    <Columns>
                        <asp:BoundColumn DataField="pid" HeaderText="ID" Visible="false" ></asp:BoundColumn>
                        <asp:BoundColumn DataField="Mobile" HeaderText="手机" ReadOnly="True">
                            <HeaderStyle Width="15%" />
                        </asp:BoundColumn>
                        <asp:BoundColumn DataField="Points" HeaderText="类别" ReadOnly="True">
                            <HeaderStyle Width="15%" />
                        </asp:BoundColumn>
                        <asp:BoundColumn DataField="PerPrice" HeaderText="单价" DataFormatString="￥{0:N2}" 
                            ReadOnly="True" ItemStyle-Font-Bold="true" ItemStyle-ForeColor="Red">
                            <HeaderStyle Width="15%" />
                            <ItemStyle Font-Bold="True" ForeColor="Red" />
                        </asp:BoundColumn>
                        <asp:TemplateColumn HeaderText="张数">
                           <ItemTemplate>
                               <asp:TextBox ID="txtCardNums" runat="server" CssClass="NumberValidate" Text='<%# DataBinder.Eval(Container.DataItem, "CardNums").ToString().Trim() %>' Font-Bold="true" ForeColor="#121d27"></asp:TextBox>
                           </ItemTemplate>
                            <HeaderStyle Width="15%" />
                        </asp:TemplateColumn>
                        <asp:ButtonColumn CommandName="Delete" Text="删除"  HeaderText="删除">
                            <HeaderStyle Width="20%" />
                        </asp:ButtonColumn>
                    </Columns>
                    <HeaderStyle BackColor="#192952" Font-Bold="True" ForeColor="White" 
                        HorizontalAlign="Center" Font-Size="13px" Height="30px"/>
                    
                </asp:DataGrid> 
             </ContentTemplate>
        </asp:UpdatePanel>
    </div>
<%--    <div style="width:729px; height:30px; line-height:30px; font-size:13px; text-align:right; font-weight:bold; color:#121D27;">
          您现在已经有<asp:Label ID="Lbl_ShoppingCardTypes" runat="server" Text="" Font-Bold="True" 
              ForeColor="Red"></asp:Label>种卡在购物车里&nbsp;| &nbsp;总计张数：<asp:Label ID="Lbl_ShoppingCardNums" 
              runat="server" Text="" Font-Bold="True" ForeColor="Red"></asp:Label>张&nbsp;|&nbsp;总计金额：<asp:Label
              ID="Lbl_ShoppingTotlalMoney" runat="server" Text="" Font-Bold="True" ForeColor="Red"></asp:Label>元&nbsp;&nbsp;&nbsp;&nbsp;
    </div>--%>
	<div id="m3">
    <table class="s1"; cellspacing=25px >
      <tr>
        <td class="s2">
          <asp:ImageButton ID="ImgBtnReturn" runat="server" 
                    ImageUrl="~/Images/CardCenterImg/jixugouka.jpg" onclick="ImgBtnReturn_Click" />    
    </td>
      </tr>
      <tr>
        <td class="s3">
          <asp:ImageButton ID="ImageBrnUpdate" runat="server" 
                    ImageUrl="~/Images/CardCenterImg/gengxin.jpg" onclick="ImgBtnUpdate_Click" />    
    </td>
      </tr>
      <tr>
        <td class="s4">
          <asp:ImageButton ID="ImgBtnClear" runat="server" 
                    ImageUrl="~/Images/CardCenterImg/qingkong.jpg" onclick="ImgBtnClear_Click"/>    
  </tr>
      <tr>
        <td class="s5">
          <asp:ImageButton ID="ImgBtnGoOnlinePay" runat="server" 
                    ImageUrl="~/Images/CardCenterImg/shouyingtai.jpg" onclick="ImgBtnGoOnlinePay_Click" />    
    </td>
      </tr>
    </table>
	</div>
</form>
</asp:Content>



